support AWS S3 region parsing for 4-part regions #1602
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes AWS S3 region parsing to support 4-part regions like
us-gov-west-1,us-iso-east-1, andus-isob-east-1. The previous regex only matched 3-part regions (e.g.,us-west-2), causing App Framework to fail when using GovCloud or ISO endpoints.Key Changes
pkg/splunk/client/awss3client.go: UpdatedregionRegexfrom([a-z]+-[a-z]+-[0-9]+)to([a-z]+-[a-z]+(?:-[a-z]+)?-[0-9]+)to make the third region component optionalpkg/splunk/client/awss3client_test.go: AddedTestGetRegion()with 10 test cases covering standard (3-part), GovCloud (4-part), and ISO regions, plus error scenariosTesting and Verification
us-west-2,eu-west-1us-gov-west-1,us-gov-east-1us-iso-east-1,us-isob-east-1Related Issues
#1567
PR Checklist